/*
 * @Author: 若城
 * @LastEditors: 若城
 * @Description:
 * @FilePath: \template\src\api\login.js
 * living Hell
 */

import request from '@/utils/request'

export function login(username, password) {
  const data = {
    'username': username,
    'password': password
  }
  return request({
    url: '/login',
    method: 'post',
    data: data
  })
}

export function logout() {
  return request({
    url: '/auth/logout',
    method: 'patch'
  })
}

export function getUserInfo() {
  return request({
    url: '/userInfo',
    method: 'get'
  })
}

